package verify;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/auto")
public class AutoReply {
	
	
	@RequestMapping("/reply")
	public String reply(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException
	{
		  /*req.setCharacterEncoding("UTF-8");
	        resp.setCharacterEncoding("UTF-8");
	   
	        try {
	            Map<String,String> map = MessageUtil.xmlToMap(req);
	            String toUserName = map.get("ToUserName");
	            String fromUserName = map.get("FromUserName");
	            String msgType = map.get("MsgType");
	            String content = map.get("Content");    
	            //判断请求是否事件类型 event
	           if(MessageUtil.MESSAGE_EVENT.equals(msgType)){
	                String eventType = map.get("Event");
	                //若是关注事件  subscribe
	                if(MessageUtil.EVENT_SUB.equals(eventType)){
	                    String mycontent = MessageUtil.menuText();
	                    message = MessageUtil.initText(toUserName, fromUserName, mycontent);

	                }
	            } 
	      
	        } catch (Exception e) {
	            e.printStackTrace();
	          
	        }   */
		return "index";
	}

}
